package com.tianyadu.security.domain;

import com.tianyadu.security.validator.MyConstraint;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * @FileName: User
 * @Description:
 * @author: xueyj
 * @create: 2018-12-04 15:48
 */
@Data
@Entity
public class UserInfo implements Serializable {
    private static final long serialVersionUID = -677422707245033268L;

    public interface UserSimpleView {};
    public interface UserDetailView extends UserSimpleView {};
    @Id
    private String id;
    @MyConstraint(message = "这是一个测试")
    // @ApiModelProperty(value = "用户名")
    private String username;

    private String password;

    private String openid;

    private Integer role;

    /*@Past(message = "生日必须是过去的时间")
    private Date birthday;*/
}